package com.ruoyi.project.bill.listerner.impl;


import com.ruoyi.project.bill.domain.Bill;
import com.ruoyi.project.bill.listerner.BillLisnerInerInterface;

import java.util.List;

/**
 * @Author: yp
 * @CreateTime: 2025/7/3
 * @Description: 保存监听实例
 * @Version: 1.0
 */
public class CommonSaveListerner implements BillLisnerInerInterface {


    public static final String BEAN_NAME = "com.ruoyi.bill.listerner.impl.CommonSaveListerner";


    @Override
    public void befor(Bill bill) {
//修改主表数据实例
//        BillData billData = bill.getBillData();
//        billData.put("bill_status","1");
//修改单据子表数据实例
//        List<BillSubData> billSubDatas = bill.getSubBillData("detailList");
//        for(BillSubData billSubData : billSubDatas){
//            billSubData.put("bill_status","1");
//        }
       //1.校验数据
        System.out.println("前置监听器执行");
       //2.数据运算

    }

    @Override
    public void after(Bill bill) {


    }
}